<template>
  <div>
    <a-form-model :model="basicDynamicFieldConfigSaveEntityParams">
      <a-form-model-item
        :rules="{ required: basicDynamicFieldConfigSaveEntityParams.fieldMust == 1 ? false : true, message: '请输入' }">
        <span slot="label">{{ basicDynamicFieldConfigSaveEntityParams.fieldName }} <a-tooltip
            v-if="basicDynamicFieldConfigSaveEntityParams.explanationPrompt" slot="suffix"
            :title="basicDynamicFieldConfigSaveEntityParams.explanationPrompt">
            <a-icon type="question-circle" style="color: rgba(0, 0, 0, 0.45)" />
          </a-tooltip></span>

        <a-input style="width: 300px" :disabled="basicDynamicFieldConfigSaveEntityParams.fieldMust == 1"
          :placeholder="basicDynamicFieldConfigSaveEntityParams.placeholder"
          v-if="basicDynamicFieldConfigSaveEntityParams.fieldType == 1">

        </a-input>

        <template v-if="basicDynamicFieldConfigSaveEntityParams.fieldType == 2">
          <a-textarea style="width: 300px" :disabled="basicDynamicFieldConfigSaveEntityParams.fieldMust == 1"
            :placeholder="basicDynamicFieldConfigSaveEntityParams.placeholder" :auto-size="{ minRows: 3, maxRows: 5 }">
          </a-textarea>

        </template>

        <a-input-number style="width: 300px" :disabled="basicDynamicFieldConfigSaveEntityParams.fieldMust == 1"
          :placeholder="basicDynamicFieldConfigSaveEntityParams.placeholder"
          v-if="basicDynamicFieldConfigSaveEntityParams.fieldType == 3 || basicDynamicFieldConfigSaveEntityParams.fieldType == 4">
        </a-input-number>
      </a-form-model-item>
    </a-form-model>
  </div>
</template>

<script>
export default {
  props: {
    basicDynamicFieldConfigSaveEntityParams: {
      type: Object,
      default: () => {
        return {}
      },
    },
  },
  data() {
    return {}
  },
  created() {
  }
}
</script>

<style lang="scss" scoped></style>
